package com.example.match;


import com.example.match.utils.AlgorithmUtils;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.List;

/**
 * @author 雨后天晴
 * @version 1.0
 * @since 2024/10/15 10:55
 */

public class AlgorithmUtilsTest {
    @Test
    public void test() {
        String str1 = "鱼皮是狗";
        String str2 = "鱼皮不是狗";
        String str3 = "鱼皮是鱼不是狗";
        // 1
        int minDistance = AlgorithmUtils.minDistance(str1, str2);
        // 3
        int minDistance1 = AlgorithmUtils.minDistance(str1, str3);
        System.out.println(minDistance);
        System.out.println(minDistance1);
    }

    @Test
    public void testTags() {
        List<String> list = Arrays.asList("Java", "大一", "男");
        List<String> list1 = Arrays.asList("Java", "大二", "女");
        List<String> list2 = Arrays.asList("Python", "大二", "女");
        String str2 = "鱼皮不是狗";
        String str3 = "鱼皮是鱼不是狗";
        // 1
        int minDistance = AlgorithmUtils.minDistance(list, list1);
        // 3
        int minDistance1 = AlgorithmUtils.minDistance(list, list2);
        System.out.println(minDistance);
        System.out.println(minDistance1);
    }
}
